var InjectHelper = {
    // 注入脚本
    addInjectScript: function (src, onLoadCallback) {
        let jsElement = document.createElement('script');
        jsElement.setAttribute('type', 'text/javascript');
        jsElement.setAttribute('charset', 'utf-8');
        jsElement.src = chrome.extension.getURL(src);
        jsElement.onload = onLoadCallback
        document.head.appendChild(jsElement);
    },

    // 注入CSS
    addInjectCss: function (src, onLoadCallback) {
        let linkElement = document.createElement('link');
        linkElement.type = 'text/css';
        linkElement.rel = 'stylesheet';
        linkElement.href = chrome.extension.getURL(src);;
        linkElement.onload = onLoadCallback
        document.head.appendChild(linkElement);
    }
};
InjectHelper.__proto__ = {}
// console.log('===>>InjectHelper')